Repository navigation
fix(browser): preserve media type parameter spelling - #6985
Merged
morluto merged 7 commits intoOct 24, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryPreserves case-sensitive media type parameters in response
Reviews (6) · Last reviewed commit: "test(ci): synchronize upstream verifier ..." · Reviewed by Greptile |
…x-cdp-media-type-parameters
…x-cdp-media-type-parameters
…x-cdp-media-type-parameters
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve case-sensitive media type parameters in captured CDP response metadata and Link declarations.
Problem and expected behavior
Multipart/Mixed; boundary="AaB03x"currently becomesmultipart/mixed; boundary="aab03x". The same lowercasing changes JSON-LD profile URI paths and protobuf message names. RFC 9110 section 8.3.1 permits case-insensitive type/subtype names, but parameter values can be case-sensitive. Captured metadata must preserve those values.Change and scope
Give media type declarations their own normalization owner: trim the declaration, lowercase only its type/subtype prefix, and preserve the complete parameter suffix. Use it for response
mime_typeand Linktype; existing token normalization for content encoding, relation, destination, and crossorigin remains intact. No separate issue: the PR includes executable reproductions.Follow the contribution scope. Ordinary correction of already-captured metadata; no separate maintainer scope decision is applicable.
Contract and boundary impact
CdpSafeMetadata, before response metadata and link declarations enter observations.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): none; no schema or dependency change.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
MIMETypeparser checks parameter equivalence; existing normalization and trust/scope controls are asserted.mime_typeand linktypenow retainboundary="AaB03x",/Profiles/Book;V=One,Two, andExample.Messageinstead of lowercasing those values.For evidence-bearing changes:
Validation performed
npm run test:focused -- src/browser/CdpSafeMetadata.test.ts tests/boundary/browser/cdpBrowserProvider.network.test.ts tests/boundary/browser/cdpResourceCompleteness.test.ts— 3 files, 126 tests passed, including production CDP adapter and public CLI Evidence coverage.node node_modules/vitest/vitest.mjs run src/browser/CdpSafeMetadata.test.ts— 85 tests passed after organizing the new cases into their own describe block.npm run check— 6 tasks, resolved module boundaries, and architecture guards passed; lint zero errors.git diff --checkand normal pre-commit lint/format — passed.Compatibility, safety, and release
Author readiness
Human owner: @ShuaixinHuang
The human owner instructed the assistant in this session to prepare all three changes and submit them directly for review; this PR is AI-assisted.
Before merge
type(scope): outcome.Synchronization validation (2026-10-24)
Synchronized reviewed upstream 347b6e4 (#7002), which includes the earlier #6986, #6988 and #6994 repairs. Current head: 4a12003. The complete feature patch is byte-for-byte identical to this PR's pre-repair feature patch and remains 2 files against that upstream revision; no verifier-test changes remain in the PR diff.
The preceding head's shard 6 had 13 failed / 1889 passed / 20 skipped from two shared test-contract mismatches. Those are historical results. A user-authorized local support patch 4b251c2 migrated the error diagnostics and run ID checks, then upstream merged #7002 concurrently. The resulting conflict was resolved by taking both upstream test files exactly. The Python cases now check VerifierCommandExitError, exit code 1 and snapshot.stderr.text. The ownership cases compare leader/descendant identities to the actual launcher-assigned nonce and distinguish the inherited identity. Archive rejection, ambient-import isolation, no extraction, process-exit-before-root-cleanup and cleanup-retry checks remain.
Clean-base comparison before the upstream merge (Windows, pinned Node 24.22.1/npm 11.16.0, Python 3.12.14, native Windows addon present): the exact focused two-file command for packedBridgeVerification.test.ts and packagedWasmVerifierOwnership.test.ts failed 10 / passed 14 / skipped 3 on be2811e, then passed 24 / skipped 3 after the local migration. A controlled temporary bypass of ast.parse made the existing invalid-Python regression fail as intended (1 failed / 23 deselected); production bytes were restored. These are local repair evidence, not the final upstream-combination result.
On the final integrated ELF branch, npm run test:focused -- tests/boundary/process/packedBridgeVerification.test.ts tests/boundary/process/packagedWasmVerifierOwnership.test.ts tests/boundary/filesystem/verifierCommandOutput.test.ts tests/boundary/process/nativeVerifierPreflightOwnership.test.ts passed 29 / skipped 14 (four files). All 24 packed-Python cases and five command-output cases passed. Existing Windows skips cover three packaged-Wasm lifecycle cases, eight native-client preflight cases and three filesystem failure cases. No new skip was introduced; Linux CI must execute the POSIX coverage. This run does not establish real external-client/provider behavior.
Each final integrated branch passed npm run check (six tasks, module boundaries and architecture guards) and git diff --check; normal commit and push hooks passed. No CI gates, timeouts or skips were weakened. Upstream #7002's own green CI does not establish this PR's new-head result. Latest-head confirmation on 2026-10-24: CI required, Conventional PR title and PR readiness all succeeded for 4a12003. Source tests and all eight test shards succeeded. Optional lanes retain their reported skips; the historical local Windows limits remain disclosed.
Earlier post-sync feature/shared validation passed 245 tests across five CDP and shared-regression files. After the earlier be2811 merge, the two import/type-erasure source files passed all 36 tests on this branch.
Earlier checks also passed all 113 reference-lifetime cases, six property-path regressions, and nine evaluation-gate tests. The former cyclic-path single case passed with the same 512 MiB heap / external 20 s guard (137 ms test time, 3.76 s elapsed); the baseline exhausted the heap. No completed-baseline speedup or process-family RSS claim is made.